class OrderChannel < ApplicationCable::Channel
  def subscribed
    hotel_id = JSON.parse(params[:room])['hotel_id']
    hotel = Hotel.find_by(id: hotel_id)
    stream_for hotel
    # stream_from "order_channel"
  end

  def unsubscribed
    # Any cleanup needed when channel is unsubscribed
  end
end
